package com.ly.common.core.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author: Wuzh
 * @Description:
 * @Date Created in 20:34 2023-09-10
 * @return
 */
public class BaseVo implements Serializable {

    /**
     * 页码
     */
    @TableField (exist = false)
    private int page = 1;

    /**
     * 每页条数
     */
    @TableField (exist = false)
    private int limit = 10;

    @ApiModelProperty ("当下审批人")
    @TableField (exist = false)
    private String approvedUser;

    @ApiModelProperty ("审批内容")
    @TableField (exist = false)
    private String approvedRemark;

    @ApiModelProperty ("审批时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField (exist = false)
    private Date approvedTime;

    @ApiModelProperty ( "当前任务信息" )
    @TableField ( exist = false )
    private ActCurrentTaskVo currentTask;

    /**
     * 返回给前端的token，不存数据库
     */
    @TableField (exist = false)
    private String token;

    /**
     * 请求参数
     */
    @TableField ( exist = false )
    private Map<String, Object> params;

    public Map<String, Object> getParams () {
        if ( params == null ) {
            params = new HashMap<>();
        }
        return params;
    }

    public void setParams ( Map<String, Object> params ) {
        this.params = params;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getLimit() {
        return limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public String getApprovedUser() {
        return approvedUser;
    }

    public void setApprovedUser(String approvedUser) {
        this.approvedUser = approvedUser;
    }

    public String getApprovedRemark() {
        return approvedRemark;
    }

    public void setApprovedRemark(String approvedRemark) {
        this.approvedRemark = approvedRemark;
    }

    public Date getApprovedTime() {
        return approvedTime;
    }

    public void setApprovedTime(Date approvedTime) {
        this.approvedTime = approvedTime;
    }

    public ActCurrentTaskVo getCurrentTask() {
        return currentTask;
    }

    public void setCurrentTask(ActCurrentTaskVo currentTask) {
        this.currentTask = currentTask;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
}